package com.softstao.guoyu.utils;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created by Administrator on 2016/4/8.
 */
public class ThreadPool {
    private static ThreadPool _ThreadPool=null;
    ExecutorService executorService = Executors.newCachedThreadPool();

    private ThreadPool(){

    }

    public static ThreadPool getInstance(){
        if(_ThreadPool==null){
            _ThreadPool=new ThreadPool();
        }
        return _ThreadPool;
    }

    public ExecutorService getExecutorService() {
        return executorService;
    }

    public void setExecutorService(ExecutorService executorService) {
        this.executorService = executorService;
    }
}
